@extends('backend.layouts.main')
@section('content')
<section class="content-header">
    <h1>
        日志管理
        <small>日志列表</small>
    </h1>
    <ol class="breadcrumb">
        <li><a href="#"><i class="fa fa-dashboard"></i> Home</a></li>
        <li><a href="#">Tables</a></li>
        <li class="active">Simple</li>
    </ol>
</section>
<section class="content">
    <div class="row">
        <div class="col-md-12">
            <div class="box">
                {!!view("backend.log._search",['request'=>$request])->render()!!}
                <!-- /.box-header -->
                <div class="box-body  table-responsive">
                    <table class="table table-striped table-bordered">
                        <thead>
                            <tr>
                                <!--<th style="width: 10px">#</th>-->
                                <th>操作人姓名</th>
                                <th>用户名</th>
                                <th>操作内容</th>
                                <th>IP</th>
                                <th>操作地区</th>
                                <th>操作时间</th>
                                <th>操作</th>
                            </tr>
                        </thead>
                        @if(!empty($logDatas[0]->id))
                        @foreach($logDatas AS $logData)
                        <tr style="color:#888;font-weight:normal">
                            <!--<td></td>-->
                            <td style="cursor:pointer" 
                                onclick="iframe('详情','log/{{encryptionUrl($logData->id)}}')">
                                {{$logData->name}}
                            </td>
                            <td>{{$logData->username}}</td>
                            <td>{{$logData->content}}</td>
                            <td>{{$logData->ip}}</td>
                            <td>{{$logData->region}}</td>
                            <td>{{$logData->created_at}}</td>
                            <td>
                                <a type="button" onclick="iframe('详情','log/{{encryptionUrl($logData->id)}}')" class="btn btn-success btn-sm"><i class="fa fa-eye"></i>详情</a>
                                <!--<a type="button" onclick="iframe('修改人员', '350', '70', 'user/{{$logData->id}}/edit')" class="btn btn-info btn-sm"><i class="fa fa-edit "></i> 修改</a>
                                <a type="button" href="user/{{$logData->id}}" class="btn btn-warning btn-sm"><i class="fa fa-hand-paper-o"></i>审核</a>
                                <a type="button" onclick="delConfirm('user/{{$logData->id}}', 'user')" class="btn btn-danger btn-sm"><i class="fa fa-close"></i>删除</a>-->
                            </td>
                        </tr>
                        @endforeach
                        @else
                        <tr style="color:#888;font-weight:normal">
                            <td colspan="8" align="center">暂无数据</td>
                        </tr>
                        @endif
                    </table>
                </div>
                <div class="box-footer clearfix">
                    <ul class="pagination pagination-sm no-margin pull-right">
                        {{$logDatas->appends(['name'=>$request->name])->links()}}
                        <li style="color:#888;font-weight:normal;font-size: smaller">
                            第 {{$logDatas->firstItem()}}-{{$logDatas->lastItem()}} 条
                        </li>&nbsp;
                        <li style="color:#888;font-weight:normal;font-size: smaller">
                            共 {{$logDatas->total()}} 条数据
                        </li> 
                    </ul>
                </div>
            </div>
        </div>
    </div>
</section>
{!!view("backend.common.status")->render()!!}
@endsection